<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name = "format-detection" content="telephone = no" />
<title>{$config_sitename}</title>
<meta name="description" content="">
<meta name="keywords" content="">
<link href="__CSS__/recipesh.css?t=201512300958" rel="stylesheet">
</head>
<body class="body-pad cl-b-lgrey">
	<div class="ub ub-ac page-header">
			<a href="javascript:history.back();" class="clickable"><span class="icon-back"></span></a>
			<div class="ub-f1 page-name">全部评论</div>
			<a href="#" class="clickable">
				<span class="icon-empty"></span>
			</a> 
		</div>
	<div id="scroll-wrapper">
		<div id="scroller">
			<ul id="thelist" class="recipe-allcomment-list comment-list-wrapper cl-b-white" data-url="{:U('Index/msgList')}?type={$type}&id={$id}" data-type="comment">
			    <li class="comment-list-title ub ub-pj row" style="padding: 0px 10px;">
        		</li>
				<foreach name="msglist" item="ml">
				<li class="ub comment-h1 clickable row" id="msg_{$ml.id}">
					<img src="{$ml.uavatar}" class="tx-cir lazy">
					<div class="comment-text ub-f1">
						<p class="cl-f-lorange comment-user" data-user="{$ml.nickname}" data-id="{$ml.id}" data-uid="{$ml.userid}">{$ml.nickname}</p>
						<p class="cl-f-lgrey comment-time">{$ml.create_time}</p>
						<div class="cl-f-grey comment-content">
							<p>{$ml.content}</p>
							<foreach name="ml.childlist" item="cl">
            					<div class="comment-h2 clickable" id="msg_{$cl.id}">
            						<span class="cl-f-lorange comment-user" data-user="{$cl.nickname}" data-id="{$cl.id}" data-uid="{$cl.userid}">@{$cl.touser.nickname}</span>
            						{$cl.content}
            					</div>
            				</foreach>
						</div>
					</div>
				</li>
				</foreach>
			</ul>
			<div class="add-loading ssp-loading">
				<div class="rect1"></div>
				<div class="rect2"></div>
				<div class="rect3"></div>
				<div class="rect4"></div>
				<div class="rect5"></div>
			</div>
		</div>
    </div>
	<div class="row cl-b-white send-comment-footer">
	    
		<input type="text" name="content" class="form-control cl-b-xxlgrey " placeholder="我要写评论">
		<input type="hidden" name="infoid" value="{$id}">
		<input type="hidden" name="type" value="{$type}">
		<input type="hidden" name="parent_id" value="0">
		<input type="hidden" name="touserid" value="0">
		<input type="hidden" name="med" value="comment">
		
		<a class="cl-f-lorange send-comment-submit" data-type="yes">发送</a>
	</div>
	
    <script src="__JS__/jquery-1.11.1.min.js"></script>
	<script src="__JS__/jquery.lazyload.min.js"></script>
	<script>
    var img_url = "__IMAGES__";
	</script>
    <script src="__JS__/custom.js?t=201512250948"></script>
    <script src="__JS__/comment.js?t=201512250948"></script>
    <script src="__JS__/page.js?t=201601051403"></script>
    <script src="__JS__/common.js?t=201512241347"></script>
    <script>
    $(function(){
        var msgid = "{$msgid}";
        if(msgid != '' && msgid != undefined && msgid != 0)
        {
//             var temp = $('#msg_' + msgid + ' .comment-user');
//             temp.each(function(i){
//                 var id = $(this).attr('data-id');
//                 if(msgid == id)
//                 {
//                     var username = $(this).attr('data-user');
//                     var uid = $(this).attr('data-uid');
//                     $('input[name=parent_id]').val(id);
//                     $('input[name=touserid]').val(uid);
//                     $('input[name=content]').attr('placeholder', '@' + username);
//                 }
//             });
        	var temp = $('#msg_' + msgid);
        	temp.click();
        }
    });
    </script>
</body>
</html>